home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1997 / MacHack 1997.toast / Hacks / Hacks ’97 / NewsTicker / source code / Internet Code / BeachBall.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-06-12  |  1.4 KB  |  53 lines  |  [TEXT/CWIE]

  1. /*------------------------------------------------------------------------------
  2. #
  3. #    NewsTicker, my Hack for 1997
  4. #
  5. #    BeachBall.h    -    Just a simple class to spin the beach ball while waiting
  6. #
  7. ------------------------------------------------------------------------------*/
  8.  
  9. #ifndef        BEACHBALL_H
  10. #define        BEACHBALL_H
  11.  
  12.  
  13.  
  14. #define kFirstBeachBallCursorID                180
  15. #define kNumBeachBallCursors                    4
  16.  
  17.     
  18. class BeachBall 
  19.     {
  20.     public:
  21.         BeachBall(short firstCursorID = kFirstBeachBallCursorID,
  22.                 short numCursors = kNumBeachBallCursors,
  23.                 short resFileRefNum = CurResFile());        
  24.             // The firstCursorID must be a positive integer.    
  25.         ~BeachBall();
  26.         void Idle();    
  27.     
  28.     private:
  29.         short                mResFileRefNum;
  30.         short                mFirstBeachBallCursorID;
  31.         short                mNumBeachBallCursors;
  32.         short                 mBeachBallIntervalInTicks;
  33.         short                mCurrentBeachBallCursorID;
  34.         unsigned long        mTicksAtPrevBeachBall;
  35.         
  36.         BeachBall(const BeachBall&);
  37.             // Unimplemented private copy constructor so class cannot be copied.
  38.             // We are short circuiting the default copy constructor mechanism here.
  39.             // The compiler will warn you if you attempt to copy this class.
  40.         operator = (const BeachBall&);        
  41.             // Unimplemented private assignment operator so class cannot be assigned.
  42.             // We are short circuiting the default assignment operator mechanism here.
  43.             // The compiler will warn you if you attempt to assign this class.
  44.     };
  45.     
  46.     
  47.     
  48. #endif        //        BEACHBALL_H
  49.  
  50.  
  51.  
  52.  
  53.